#ifndef STX_ALGORITHM_REVERSE_COPY_HPP
#define STX_ALGORITHM_REVERSE_COPY_HPP

#include <stx/algorithm/common.hpp>

namespace stx {

template <class BidirectionalIterator, class OutputIterator>
inline OutputIterator
reverse_copy(BidirectionalIterator first, BidirectionalIterator last, OutputIterator result)
{
    for (; first != last; ++result) {
        *result = *--last;
    }
    return result;
}

} // namespace stx

#endif // STX_ALGORITHM_REVERSE_COPY_HPP
